<template>
	<view class="bottom">
		<!-- <image class="bottom-img" src="../../static/btn.png" mode="" @click="tz"></image> -->
		<view class="bottom-item" @click="jump('/pages/index/indexs')">
			<image class="bottom-item-icon" src="../../static/home.png" mode="widthFix"></image>
			<text>首页</text>
		</view>
		<view class="bottom-item margin-left" @click="jump('/pages/cart/cart')">
			<image class="bottom-item-icon" src="../../static/cart.png" mode="widthFix"></image>
			<text>购物车</text>
			<view class="number">
				<text>{{value}}</text>
			</view>
		</view>
		<view class="bottom-right">
			<view class="submit" @click="jump('/pages/cart/cart')">
				去结算
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			value: {
				type: Number,
				default: 0
			}
		},
		methods: {
			jump(url) {
				uni.switchTab({
					url
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.bottom {
		position: fixed;
		bottom: 0;
		width: 750rpx;
		background-color: rgba(255, 255, 255, 0.9);
		padding: 30rpx 15rpx 20rpx 20rpx;
		// box-shadow: 0 0 15rpx #999999;
		display: flex;
		align-items: center;
		z-index: 999;

		// &-img {
		// 	width: 700rpx;
		// 	height: 90rpx;
		// }

		&-item {
			display: flex;
			flex-direction: column;
			align-items: center;
			justify-content: center;
			position: relative;

			image {
				width: 50rpx;
			}

			text {
				font-size: 13px;
				padding-top: 5rpx;
			}

			.number {
				position: absolute;
				right: -20rpx;
				top: -20rpx;

				text {
					position: absolute;
					font-size: 11px;
					background-color: red;
					color: #FFFFFF;
					// border: 1px solid #E04C20;
					// color: #E04C20;
					min-height: 35rpx;
					/*改后新增的代码*/
					min-width: 45rpx;
					line-height: 24rpx;
					right: 5rpx;
					top: 0rpx;
					text-align: center;
					-webkit-border-radius: 24rpx;
					border-radius: 24rpx;
					padding: 8rpx;
				}
			}
		}

		&-right {
			flex: 1;
			display: flex;
			justify-content: flex-end;
			align-items: center;

			.price {
				font-size: 13px;
			}

			.text-l {
				color: #36B542;
			}

			.submit {
				width: 330rpx;
				margin-left: 15rpx;
				color: #FFFFFF;
				background-color: #36B542;
				border-radius: 35rpx;
				padding: 15rpx 40rpx;
				text-align: center;
				line-height: 45rpx;
				font-size: 16px;
			}
		}

		.arrow-icon {
			width: 15rpx;
		}

		.margin-left {
			margin-left: 40rpx;
		}
	}
</style>
